package org.darkforest.dao.mapper;

import org.darkforest.dao.annotation.DBMapper;
import org.darkforest.model.OrderGoods;
import org.darkforest.model.OrderGoodsSearchBean;

import java.util.List;
import java.util.Map;

@DBMapper
public interface OrderGoodsMapper {
    int deleteByPrimaryKey(Integer recId);

    int insert(OrderGoods record);

    int insertSelective(OrderGoods record);

    OrderGoods selectByPrimaryKey(Integer recId);

    int updateByPrimaryKeySelective(OrderGoods record);

    int updateByPrimaryKey(OrderGoods record);

    /**
     * 根据订单ID获取
     * @param orderId
     * @return
     */
    List<OrderGoods> findOrderGoodsListByOrderId(Integer orderId);

    OrderGoods findOrderGoodsByCond(OrderGoods orderGoods);

    List<Map<String,Object>> Top50OrderAmount(OrderGoodsSearchBean goods);

    List<Map<String,Object>> Top50GoodsCount(OrderGoodsSearchBean goods);

    List<Map<String,Object>> goodsSaleDetail(OrderGoodsSearchBean goods);
}